package org.example.service.Impl;

import org.example.config.R;
import org.example.domain.Material;
import org.example.mapper.MaterialMapper;
import org.example.service.MaterialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MaterialServiceImpl implements MaterialService {
    @Autowired
    MaterialMapper materialMapper;
    @Override
    public void materialSave(Material material) {
        materialMapper.materialSave(material);
    }

    @Override
    public List<Material> materialList() {
        return materialMapper.materialList();
    }

    @Override
    public R updateById(Integer id) {
        materialMapper.updateById(id);
        return R.successed(null);
    }

    @Override
    public R updateByIdStatus(Integer id) {
        materialMapper.updateByIdStatus(id);
        return R.successed(null);
    }
}
